package com.lan.schedule;

import android.content.Context;
import android.media.MediaPlayer;
import android.util.AttributeSet;
import android.widget.VideoView;

public class BackVideoView extends VideoView {

    public BackVideoView (Context context) {
        super(context);
    }

    public BackVideoView (Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public BackVideoView (Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
//
//    public CustomVideoView(Context context, AttributeSet attrs, int defStyleAttr, int
//            defStyleRes) {
//        super(context, attrs, defStyleAttr, defStyleRes);
//    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        //重新设置计算高度
        int width = getDefaultSize(0, widthMeasureSpec);
        int height = getDefaultSize(0, heightMeasureSpec);
        setMeasuredDimension(width, height);
    }

    @Override
    public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
        super.setOnPreparedListener(l);
    }


}
